#!/sbin/openrc-run
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

extra_started_commands="reload"

depend() {
	need net
	use logger dns ypbind
}

start() {
	ebegin "Starting pop-before-smtp"
	start-stop-daemon --start --pidfile /var/run/pop-before-smtp.pid --exec /usr/sbin/pop-before-smtp -- --daemon=/var/run/pop-before-smtp.pid
	eend $?
}

stop() {
	ebegin "Stopping pop-before-smtp"
	start-stop-daemon --stop --pidfile /var/run/pop-before-smtp.pid
	eend $?
}

reload() {
	ebegin "Reloading postfix"
	/usr/sbin/postfix reload &>/dev/null
	eend $?
}
